"""


"""
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from rest_framework.generics import ListAPIView
from rest_framework.viewsets import ModelViewSet

from meiduo_admin.my_pagination import MyPageNumberPagination
from meiduo_admin.serializers.permission_manage_serializers import PermissionSerializer, ContentTypeSerializer


class PermissionManageView(ModelViewSet):
    serializer_class = PermissionSerializer
    pagination_class = MyPageNumberPagination
    queryset = Permission.objects.order_by("id")


class ContentTypeView(ListAPIView):
    serializer_class = ContentTypeSerializer
    queryset = ContentType.objects.all()


